package org.nobody.mallb2c.mallware.feign;

import org.nobody.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author 3489309323@qq.com
 * @create 2020-08-06-11:08
 */
@FeignClient("mall-product")
public interface ProductFeignService {
  /**
   * 1) 让所有请求过网关
   *    @FeignClient("mall-gateway")
   *    /api/mallproduct/spuinfo/info/{id}
   * 2) 直接让后台指定服务处理
   *    @FeignClient("mall-product")
   *    /mallproduct/spuinfo/info/{id}
   * @param skuId
   * @return
   */
  @RequestMapping("/mallproduct/skuinfo/info/{skuId}")
  public R info(@PathVariable("skuId") Long skuId);
}
